﻿// FLMScanFactory
// Factory for creation of instance representing Riedmaier reconstruction algorithm
// 
// FLMScan - Featured by FabLab Munich

using System;
using System.IO;
using FLMScan.Parameters;

namespace FLMScan.WorldCoordinateReconstruction.Riedmaier
{
    class RiedmaierReconstructionFactory
    {
        public static RiedmaierReconstruction Make(CameraSensorParameters cameraSensorParameters
            , LaserPlaneParameters laserPlaneParameters, RotationAxisParameters rotationAxisParameters)
        {
            RiedmaierReconstruction reconstruction = null;

            string fullExecutablePath = typeof(RiedmaierReconstructionFactory).Assembly.Location;
            string executablePath = Path.GetDirectoryName(fullExecutablePath);

            CameraSensor cameraSensor = new CameraSensor(cameraSensorParameters);
            LaserPlane laserPlane = new LaserPlane(laserPlaneParameters);
            RotationAxis axis = new RotationAxis(rotationAxisParameters);

            reconstruction = new RiedmaierReconstruction(cameraSensor, laserPlane, axis);

            return reconstruction;
        }
    }
}
